package com.abc.core.tool;

import com.abc.core.consts.CellFixedName;
import com.abc.core.consts.DataType;
import com.abc.core.def.Dna;
import com.abc.core.def.Vd;

import java.time.LocalDateTime;

public class MdDnaTool {
    public static Dna getMdDna() {
        Dna mdDna = new Dna("mdDnaCode", "mdDnaCode", "主数据结构dna");
        mdDna.setMultiple(0, 9999);
        mdDna.setDbMapCode("md_dna_db_map");
        mdDna.setCursive(false);
        mdDna.setLastTime(LocalDateTime.now());
        mdDna.addVd(new Vd("code", "代码", DataType.DATA_TYPE_STRING));
        mdDna.addVd(new Vd("code", "名称", DataType.DATA_TYPE_STRING));
        mdDna.addVd(new Vd("description", "描述", DataType.DATA_TYPE_STRING));
        mdDna.addVd(new Vd(CellFixedName.DEF_DNA_CODE, "Dna 代码", DataType.DATA_TYPE_STRING));

        Dna mvDna = new Dna("mvDnaCode", "mvDnaCode", "主数据值结构dna");
        mvDna.setMultiple(0, 999);
        mvDna.setDbMapCode("mv_dna_db_map");
        mvDna.setLastTime(LocalDateTime.now());
        mvDna.addVd(new Vd("code", "代码", DataType.DATA_TYPE_STRING));
        mvDna.addVd(new Vd("name", "名称", DataType.DATA_TYPE_STRING));
        mvDna.addVd(new Vd("description", "描述", DataType.DATA_TYPE_STRING));

        mdDna.addChild(mvDna);

        return mdDna;
    }
}
